home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3962 < prev    next >
Encoding:
Text File  |  1996-08-06  |  3.3 KB  |  81 lines

  1. Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
  2. Path: alexandria.organon.com!alexandria!jsa
  3. From: jsa@organon.com (Jon S Anthony)
  4. Subject: Re: Hungarian notation
  5. In-Reply-To: miker3@ix.netcom.com's message of Fri, 26 Jan 1996 03:04:17 GMT
  6. Message-ID: <JSA.96Jan26175507@organon.com>
  7. Sender: news@organon.com (news)
  8. Organization: Organon Motives, Inc.
  9. References: <30C40F77.53B5@swsbbs.com> <4d2ok0$69s@beach.and.nl>
  10.     <4dtv3gINNo9u@keats.ugrad.cs.ubc.ca>
  11.     <SPENCER.96Jan22113215@zorgon.ERA.COM> <4e1nd8$hv0@solutions.solon.com>
  12.     <3104bfc8.132251392@nntp.ix.netcom.com> <dewar.822407919@schonberg>
  13.     <3106260f.224013120@nntp.ix.netcom.com> <4e6oj9$o02@news.xmission.com>
  14.     <31077335.52859072@nntp.ix.netcom.com> <JSA.96Jan25190824@organon.com>
  15.     <310842ad.6002240@nntp.ix.netcom.com>
  16. Date: Fri, 26 Jan 1996 22:55:07 GMT
  17.  
  18. In article <310842ad.6002240@nntp.ix.netcom.com> miker3@ix.netcom.com (Mike Rubenstein) writes:
  19.  
  20. > jsa@organon.com (Jon S Anthony) wrote:
  21. > > In article <31077335.52859072@nntp.ix.netcom.com> miker3@ix.netcom.com (Mike Rubenstein) writes:
  22. > > 
  23. > > > I think you're reading something into my post that isn't there.
  24. > > > 
  25. > > > What am I reading into the standard that's not there?  Nothing in my
  26. > > > post suggests that defining the result as always 0 is illegal.  In
  27. > > > fact, it is clearly legal.
  28. > > > 
  29. > > > But the standard does impose some restrictions on the definition.  The
  30. > > > definition must specify that the subject type is converted to the
  31. > > > object type.  It must not produce side-effects.
  32. > > > 
  33. > > > Please reread my post; I was responding to the statement that the
  34. > > > definition could be to delete the system disk.  That is out of bounds
  35. > > > for the definition and I said so.  I did not say that defining the
  36. > > > result to be 0 is out of bounds.
  37. > > 
  38. > > Face it.  You just plain got it wrong.  Deleting the system disk is
  39. > > perfectly within bounds.  Stupid, for sure, as no one in their right
  40. > > mind would use such a compiler, but perfectly legal.
  41. > Please cite anything in the standard that supports your position.  I
  42. > can find nothing in the standard that gives an implementation that
  43. > license.
  44. > Insults do not prove a point -- quotes from the standard do.  I've
  45. > shown the passages that support my position.
  46.  
  47. I don't see any insult here at all.  Sorry if you took it that way.
  48.  
  49. Here's the relevant passage yet again:
  50.  
  51.      When a value with integral type is demoted to a signed integer
  52.      with smaller size or an unsigned integer is converted to its 
  53.      corresponding signed integer, if the value cannot be 
  54.      represented the result is implementation defined.
  55.  
  56. Now, the problem is (as James Kanze has pointed out) that the term
  57. "result" which you believe to know the "correct" definition of, is not
  58. defined.  Because of this it _could_ be taken as meaning "result of
  59. the computation".  You take it as a given that it means "result of the
  60. expression", i.e., its value.  But that is not clear, and so an
  61. interpretation given the former reading would indeed allow for
  62. virtually any sort of behavior as long as that behavior was
  63. documented.  As James Kanze pointed out, a very _reasonable_
  64. interpretation given this reading of "result" would be to to signal
  65. (raise) an exception.
  66.  
  67. /Jon
  68.  
  69. -- 
  70. Jon Anthony
  71. Organon Motives, Inc.
  72. 1 Williston Road, Suite 4
  73. Belmont, MA 02178
  74.  
  75. 617.484.3383
  76. jsa@organon.com
  77.  
  78.